package com.sky.context;

/**
 * @author zzw
 * @date 2025/6/7
 * @description 用户ThreadLocal
 */
public class UserContext {
    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();



    public static void setUserId(Long id) {
        threadLocal.set(id);
    }


    public static Long getUserId() {
        return threadLocal.get();
    }


    public static void removeUserId() {
        threadLocal.remove();
    }
}
